from django.shortcuts import render

# Create your views here.
from fdfs_client.client import Fdfs_client

"""
上传图片的代码
"""
# 1.创建客户端
# 修改加载配置文件的路径
client = Fdfs_client('utils/fastdfs/client.conf')

# 2.上传图片
# 图片的绝对路径
client.upload_by_filename('/home/jim/Desktop/jinhuan_project/front_end_pc/images/adv01.jpg')

# 3.获取file_id.upload_by_filename()上传成功会返回字典数据
# 字典数据中有file_id
